package com.javaspeak.concurrency.pattern.application;

import java.math.BigDecimal;
import java.util.Calendar;

/**
 * @author John Dickerson
 */
public final class Trade {

    private final Long tradeId;
    private final BigDecimal amount;
    private final BigDecimal units;
    private final Calendar tradeDate;


    public Trade( Long tradeId, BigDecimal amount, BigDecimal units,
            Calendar tradeDate ){

        this.tradeId = tradeId;
        this.amount = amount;
        this.units = units;
        this.tradeDate = tradeDate;
    }


    public Long getTradeId() {

        return tradeId;
    }


    public BigDecimal getAmount() {

        return amount;
    }


    public BigDecimal getUnits() {

        return units;
    }


    public Calendar getTradeDate() {

        return tradeDate;
    }


    @Override
    public String toString() {
        return "Trade [tradeId=" + tradeId + ", amount=" + amount + ", units="
                + units + ", tradeDate=" + tradeDate + "]";
    }
}
